<?php

namespace app\client\model;

use think\Db;
use think\Request;
use think\Model;

class FreightTemplate extends Model
{

    // 模型事件
    protected static function init()
    {
        // 写入前
        self::event('before_write', function ($data) {
            $data->area_id = implode(',', Request::instance()->param('area_id/a')) . ',';
        });
    }

}
